package com.taxsystem.chenliangli.askquestion;


import com.main.taxsystem.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class fristpageActivity extends Activity {
	
	private Button entering,search,listall;
	
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fristpage_question);
        init();
	}
	
	
	//初始化所有的组件
	public void init()
	{
		entering=(Button)findViewById(R.id.fristpage_bn_entering);
		entering.setOnClickListener(listener);
		search=(Button)findViewById(R.id.fristpage_bn_search);
		search.setOnClickListener(listener);
		listall=(Button)findViewById(R.id.fristpage_bn_listAll);
		listall.setOnClickListener(listener);

	}
	
	
	
	//定义点击按钮的响应事件
	OnClickListener listener=new OnClickListener(){

		@Override
		public void onClick(View v) {
		
			Intent intent=new Intent();
			switch(v.getId())
			{
			case R.id.fristpage_bn_entering:
				{
					intent.setClass(fristpageActivity.this,enterActivity.class);
					
				}break;
			case R.id.fristpage_bn_search:
				{
					
					intent.setClass(fristpageActivity.this,alreadyanswerActivity.class);
					
				}break;
			case R.id.fristpage_bn_listAll:
				{
					
					intent.setClass(fristpageActivity.this,listAllActivity.class);
					
				}break;
			default:
				break;
			}
			
			startActivity(intent);
			
		}
		
	};
	


}

